import { getCommonData } from "@/api/project/common.js";
export default function useCommonFetch(name, code) {
  let result = ref([]);
  const getList = async (name, code) => {
    const params = {
      bizName: name,
      valueCascade: code,
    };
    try {
      const res = await getCommonData(params);
      result.value = res.data;
    } catch (error) {
      console.log(error);
    }
  };
  getList(name, code);
  return result;
}
